<div class="form">


    <?php
    $form = $this->beginWidget('GxActiveForm', array(
        'id' => 'page-type-form',
        'enableAjaxValidation' => false,
    ));
    ?>

    <p class="note innerError">
        <?php echo Yii::t('app', 'Fields with'); ?> <span class="required">*</span> <?php echo Yii::t('app', 'are required'); ?>.
    </p>

    <div class="row">
        <?php echo $form->labelEx($model, 'page_name'); ?>
        <?php echo $form->textField($model, 'page_name', array('maxlength' => 45)); ?>
        <?php echo $form->error($model, 'page_name'); ?>
    </div><!-- row -->
    <?php if (PageType::model()->count()): ?>
        <?php
        $parents = PageType::model()->findAll('parent_id=0 AND status=1');
        $cm = new CommonCategoryMethods();
        $data = $cm->makeDropDown($parents);
        ?>

        <div class="row">
            <div class="rowLabel"><?php echo $form->labelEx($model, 'parent_id'); ?> </div>
            <div class="rowControl"> <?php echo $form->dropDownList($model, 'parent_id', $data, array('class' => 'selectbox')); ?>
                <?php echo $form->error($model, 'parent_id'); ?>
            </div>	 
        </div>	

    <?php endif ?>
    <div class="row">
        <?php echo $form->labelEx($model, 'status'); ?>
        <?php echo $form->dropDownList($model, 'status', array('1' => 'Active', 0 => 'De-Active')) ?>
        <?php echo $form->error($model, 'status'); ?>
    </div><!-- row -->
    <div class="gap"></div>
    <div class="row">
        <?php
        echo GxHtml::submitButton(Yii::t('app', 'Save'), array('class' => 'read-more pull-left'));
        $this->endWidget();
        ?>
    </div>
</div>
<!-- form -->
<div class="gap"></div>
<div class="gap"></div>  

</div>
<div class="col-lg-2"></div>
</div>
</div>
</div>
</div>

</div>
</section>
<div class="gap"></div>
<div class="gap"></div>